<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <title>钉钉-视频详情</title>
    <script type="text/javascript" src="./js/web-view.min.js"></script>
    <script src="./js/jquery-2.1.0.min.js"></script>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        video{
            width: 100%;
        }

        .index{
            width: 100%;
            height: 100%;
            position: absolute;
        }
        .title{
            background-color: white;
            overflow: hidden;
            padding: .6rem;
            position: relative;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            border-bottom: 3px solid #f5f5f5;
        }
        .list{
            padding: .6rem .6rem 2rem;
        }
        .list-title{
            margin-bottom: .8rem;
            font-weight: bold;
        }
        .list-title .link{
            float: right;
        }
        .list-item{
            margin: 0 0 .6rem;
            padding: 0 0 0 2.4rem;
            border-radius: .2rem;
            overflow: hidden;
            position: relative;
            
        }
        .list-item-cover{
            width: 1.6rem;
            height: 1.6rem;
            position: absolute;
            left: 0;
            border-radius: 50%;
            overflow: hidden;
            background-color: #f5f5f5;
        }
        .list-item-cover image{
            width: 100%;
            height: 100%;
        }
        .list-item-info{
            color: #666;
            height: 1.4rem;
            font-size: .44rem;
            line-height: .7rem;
            text-align: left;
            position: relative;
            overflow: hidden;
            margin-bottom: .2rem;
        }
        .list-item-info span{
            color: #999;
            font-size: .4rem;
            line-height: .5rem;
        }
        .list-item-title{
            font-size: .5rem;
            text-align: left;
            padding-bottom: .4rem;
            border-bottom: 1px solid #f5f5f5;
        }
        .introduce{
            width: 100%;
            overflow: hidden;
        }
        .foot{
            width: 90%;
            height: 1.6rem;
            position: fixed;
            bottom: 0;
            padding: .4rem 5%;
            border-top: 1px solid #f5f5f5;
            background-color: white;
        }
        .foot input{
            max-width: 65%;
            height: 1.6rem;
            border-radius:1.4rem;
            float: left;
            padding: 0 5%;
            border: 0;
            margin-right: 5%;
            overflow: hidden;
            background-color: #f1f1f1;
        }
        .foot button{
            width: 20%;
            height: 1.6rem;
            color: #fff;
            line-height: 1.4rem;
            font-size: .6rem;
            float: left;
            margin: 0;
            border: 0;
            border-radius: 1.4rem;
            background-color: blue;
        }
    </style>
</head>
<body>
    <div class="index">
        <div class="video">
            <video id="myVideo" controls="controls" poster="../../images/user.jpg" src="http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400"></video>
        </div>
        <div class="title">
            {{info.title}}
        </div>
        <div class="list">
            <div class="list-title">
                <span>精彩评论</tspanxt>
                <a class="link" href="javascript:;">随堂测试</navigator>
            </div>
            <div class="list-item" a:for="{{list}}">
                <div class="list-item-cover">
                    <image mode="aspectFill" src="{{item.img}}"/>
                </div>
                <div class="list-item-info">
                    <p>{{item.user}}</p>
                    <span>{{item.date}}</span>
                </div>
                <div class="list-item-title">
                    <p>{{item.content}}</p>
                </div>
            </div>
        </div>
        <div class="foot">
            <input type="text" placeholder="我想说..."/>
            <button type="primary">发送</button>
        </div>
    </div>
</body>
<script type="text/javascript">
    $(function() {// 初始化内容
    
        console.log('页面加载');
        myVid=document.getElementById("myVideo");
        myVid.currentTime=5;
        if (navigator.userAgent.toLowerCase().indexOf('dingtalk') > -1) {
            document.writeln('<script src="https://appx/web-view.min.js"' + '>' + '<' + '/' + 'script>');
        }

        // 网页向小程序 postMessage 消息
        dd.postMessage({name:"测试web-view",currentTime:5});

        // 接收来自小程序的消息。
        dd.onMessage = function(e) {
            console.log(e); //{'sendToWebView': '1'}
        }
    }); 
    $('.link').click(function(){
       console.log('准备跳转答题测试页');
        dd.navigateTo({url: '/page/studyAnswer/studyAnswer'}); 
    })
        
</script>
</html>